Optimal. Leaf size=124 \[ -\frac{\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac{\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}-\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}-2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}+2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0774642, antiderivative size = 124, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.156, Rules used = {1169, 634, 617, 204, 628} \[ -\frac{\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac{\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}-\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}-2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}+2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1169
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx &=\frac{\int \frac{2 b-b^{2/3} x}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx}{2 b}+\frac{\int \frac{2 b+b^{2/3} x}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx}{2 b}\\ &=\frac{3}{4} \int \frac{1}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx+\frac{3}{4} \int \frac{1}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx-\frac{\int \frac{-\sqrt [3]{b}+2 x}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx}{4 \sqrt [3]{b}}+\frac{\int \frac{\sqrt [3]{b}+2 x}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx}{4 \sqrt [3]{b}}\\ &=-\frac{\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac{\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac{3 \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 x}{\sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac{3 \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+\frac{2 x}{\sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}\\ &=-\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}-2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac{\sqrt{3} \tan ^{-1}\left (\frac{\sqrt [3]{b}+2 x}{\sqrt{3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac{\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac{\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}\\ \end{align*}
Mathematica [C] time = 0.134815, size = 115, normalized size = 0.93 \[ \frac{\sqrt [4]{-1} \left (\sqrt{\sqrt{3}-i} \left (\sqrt{3}-3 i\right ) \tan ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}+i} \sqrt [3]{b}}\right )-\sqrt{\sqrt{3}+i} \left (\sqrt{3}+3 i\right ) \tanh ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}-i} \sqrt [3]{b}}\right )\right )}{2 \sqrt{6} \sqrt [3]{b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 89, normalized size = 0.7 \begin{align*} -{\frac{1}{4}\ln \left ({b}^{{\frac{2}{3}}}-\sqrt [3]{b}x+{x}^{2} \right ){\frac{1}{\sqrt [3]{b}}}}+{\frac{\sqrt{3}}{2}\arctan \left ({\frac{\sqrt{3}}{3} \left ( -\sqrt [3]{b}+2\,x \right ){\frac{1}{\sqrt [3]{b}}}} \right ){\frac{1}{\sqrt [3]{b}}}}+{\frac{1}{4}\ln \left ({b}^{{\frac{2}{3}}}+\sqrt [3]{b}x+{x}^{2} \right ){\frac{1}{\sqrt [3]{b}}}}+{\frac{\sqrt{3}}{2}\arctan \left ({\frac{\sqrt{3}}{3} \left ( \sqrt [3]{b}+2\,x \right ){\frac{1}{\sqrt [3]{b}}}} \right ){\frac{1}{\sqrt [3]{b}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.5106, size = 170, normalized size = 1.37 \begin{align*} -\frac{i \, \sqrt{3} \log \left (\frac{2 \, x - i \, \sqrt{3} b^{\frac{1}{3}} + b^{\frac{1}{3}}}{2 \, x + i \, \sqrt{3} b^{\frac{1}{3}} + b^{\frac{1}{3}}}\right )}{4 \, b^{\frac{1}{3}}} - \frac{i \, \sqrt{3} \log \left (\frac{2 \, x - i \, \sqrt{3} b^{\frac{1}{3}} - b^{\frac{1}{3}}}{2 \, x + i \, \sqrt{3} b^{\frac{1}{3}} - b^{\frac{1}{3}}}\right )}{4 \, b^{\frac{1}{3}}} + \frac{\log \left (x^{2} + b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b^{\frac{1}{3}}} - \frac{\log \left (x^{2} - b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b^{\frac{1}{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.84745, size = 768, normalized size = 6.19 \begin{align*} \left [\frac{\sqrt{3} b \sqrt{-\frac{1}{b^{\frac{2}{3}}}} \log \left (\frac{2 \, x^{3} + \sqrt{3}{\left (2 \, b^{\frac{2}{3}} x^{2} + b x - b^{\frac{4}{3}}\right )} \sqrt{-\frac{1}{b^{\frac{2}{3}}}} - 3 \, b^{\frac{2}{3}} x - b}{x^{3} + b}\right ) + \sqrt{3} b \sqrt{-\frac{1}{b^{\frac{2}{3}}}} \log \left (\frac{2 \, x^{3} + \sqrt{3}{\left (2 \, b^{\frac{2}{3}} x^{2} - b x - b^{\frac{4}{3}}\right )} \sqrt{-\frac{1}{b^{\frac{2}{3}}}} - 3 \, b^{\frac{2}{3}} x + b}{x^{3} - b}\right ) + b^{\frac{2}{3}} \log \left (x^{2} + b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right ) - b^{\frac{2}{3}} \log \left (x^{2} - b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b}, \frac{2 \, \sqrt{3} b^{\frac{2}{3}} \arctan \left (\frac{\sqrt{3}{\left (2 \, x + b^{\frac{1}{3}}\right )}}{3 \, b^{\frac{1}{3}}}\right ) - 2 \, \sqrt{3} b^{\frac{2}{3}} \arctan \left (-\frac{\sqrt{3}{\left (2 \, x - b^{\frac{1}{3}}\right )}}{3 \, b^{\frac{1}{3}}}\right ) + b^{\frac{2}{3}} \log \left (x^{2} + b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right ) - b^{\frac{2}{3}} \log \left (x^{2} - b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 0.398252, size = 143, normalized size = 1.15 \begin{align*} \frac{\left (- \frac{1}{4} - \frac{\sqrt{3} i}{4}\right ) \log{\left (2 \sqrt [3]{b} \left (- \frac{1}{4} - \frac{\sqrt{3} i}{4}\right ) + x \right )} + \left (- \frac{1}{4} + \frac{\sqrt{3} i}{4}\right ) \log{\left (2 \sqrt [3]{b} \left (- \frac{1}{4} + \frac{\sqrt{3} i}{4}\right ) + x \right )} + \left (\frac{1}{4} - \frac{\sqrt{3} i}{4}\right ) \log{\left (2 \sqrt [3]{b} \left (\frac{1}{4} - \frac{\sqrt{3} i}{4}\right ) + x \right )} + \left (\frac{1}{4} + \frac{\sqrt{3} i}{4}\right ) \log{\left (2 \sqrt [3]{b} \left (\frac{1}{4} + \frac{\sqrt{3} i}{4}\right ) + x \right )}}{\sqrt [3]{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15824, size = 124, normalized size = 1. \begin{align*} \frac{\sqrt{3} \arctan \left (\frac{\sqrt{3}{\left (2 \, x + b^{\frac{1}{3}}\right )}}{3 \,{\left | b \right |}^{\frac{1}{3}}}\right )}{2 \,{\left | b \right |}^{\frac{1}{3}}} + \frac{\sqrt{3} \arctan \left (\frac{\sqrt{3}{\left (2 \, x - b^{\frac{1}{3}}\right )}}{3 \,{\left | b \right |}^{\frac{1}{3}}}\right )}{2 \,{\left | b \right |}^{\frac{1}{3}}} + \frac{\log \left (x^{2} + b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b^{\frac{1}{3}}} - \frac{\log \left (x^{2} - b^{\frac{1}{3}} x + b^{\frac{2}{3}}\right )}{4 \, b^{\frac{1}{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]